<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<FitnessMVC.Data.BlogPost>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Edit</h2>

    <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Fields</legend>
            <p>
                <label for="PostId">PostId:</label>
                <%= Html.TextBox("PostId", Model.PostId) %>
                <%= Html.ValidationMessage("PostId", "*") %>
            </p>
            <p>
                <label for="BlogId">BlogId:</label>
                <%= Html.TextBox("BlogId", Model.BlogId) %>
                <%= Html.ValidationMessage("BlogId", "*") %>
            </p>
            <p>
                <label for="Title">Title:</label>
                <%= Html.TextBox("Title", Model.Title) %>
                <%= Html.ValidationMessage("Title", "*") %>
            </p>
            <p>
                <label for="Contents">Contents:</label>
                <%= Html.TextBox("Contents", Model.Contents) %>
                <%= Html.ValidationMessage("Contents", "*") %>
            </p>
            <p>
                <label for="DatePosted">DatePosted:</label>
                <%= Html.TextBox("DatePosted", String.Format("{0:g}", Model.DatePosted)) %>
                <%= Html.ValidationMessage("DatePosted", "*") %>
            </p>
            <p>
                <label for="Publish">Publish:</label>
                <%= Html.TextBox("Publish", Model.Publish) %>
                <%= Html.ValidationMessage("Publish", "*") %>
            </p>
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%=Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

